## 模板2
env = Environment()
env["PROGSUFFIX"] = ".out"  # 可执行后缀.out
env["CCFLAGS"] = " -g3 -O0 -Wall"  # gdb 调试开关
# -pthread -lprotobuf
env.MergeFlags(["!pkg-config protobuf --cflags --libs"])

build_protobuf_toPython = "protoc --python_out=. $SOURCE"
build_protobuf_toCpp = "protoc --cpp_out=. $SOURCE"

Command("addressbook.pb.h", "addressbook.proto", build_protobuf_toCpp)
env.Program(Split("1_addressbook_protobuf实例.cc addressbook.pb.cc"))
Command("person.pb.h", "person.proto", build_protobuf_toCpp)
env.Program(Split("2_protobuf_person_序列号到字节.cc person.pb.cc"))

Command("array_obj.pb.h", "array_obj.proto", build_protobuf_toCpp)
env.Program(Split("3_protobuf_数组.cc array_obj.pb.cc"))
